const esbuild = await import('esbuild')

let result

let text = `
Helllo World
`

result = esbuild.transformSync(text, {
    loader: 'text',
})

console.log(result)

/*
{
  warnings: [],
  code: 'module.exports = "\\nHelllo World\\n";\n',
  map: ''
}
*/

result = esbuild.transformSync(text, {
    loader: 'text',
    format: 'esm',
})

console.log(result)

/*
{
  warnings: [],
  code: 'var stdin_default = "\\nHelllo World\\n";\n' +
    'export {\n' +
    '  stdin_default as default\n' +
    '};\n',
  map: ''
}
*/
